{{- range $key, $value := .CandiVersionMap.k8s }}
  {{- $version := $key | toString }}
  {{- $patch := $value.patch | toString }}
  {{- $image_version := printf "%s.%s" $version $patch | replace "." "-" }}
---
image: {{ $.ModuleName }}/{{ $.ImageName }}-{{ $image_version }}
from: {{ $.Images.BASE_SCRATCH }}
import:
- artifact: {{ $.ModuleName }}/{{ $.ImageName }}-artifact-{{ $image_version }}
  add: /
  to: /
  includePaths:
  - kubectl
  - install
  - uninstall
  before: setup
docker:
  LABEL:
    distro: all
    version: all
    kubectl: {{ printf "%s.%s" $version $patch }}
---
artifact: {{ $.ModuleName }}/{{ $.ImageName }}-artifact-{{ $image_version }}
from: {{ $.Images.BASE_SCRATCH }}
git:
- add: /{{ $.ModulePath }}modules/007-{{ $.ModuleName }}/images/{{ $.ImageName }}/scripts
  to: /
  stageDependencies:
    setup:
    - '**/*'
import:
- artifact: common/kubernetes-artifact-{{ $image_version }}
  add: /src/_output/bin/kubectl
  to: /kubectl
  before: setup
{{- end }}
